﻿@model ContactManagement.Models.RegisterModel
@{
    ViewBag.Title = GlobalResources.PageTitles.RegisterRESX;
}

<div class="span12">
    <h2>@GlobalResources.AccountViews.CreateNewAccountHeaderRESX</h2>
    <hr />
    <div class="well">@GlobalResources.AccountViews.CreateNewAccountTextRESX</div>
</div>
<div class="span12">
    @using (Html.BeginForm(EActionAccount.Register.ToString(), EControllers.Account.ToString(), FormMethod.Post, new { @class = "form-horizontal" }))
    {
        <fieldset>
            @Html.MyValidationSummary(GlobalResources.SystemMessages.AccountCreationErrorRESX)

            <div class="control-group">
                @Html.LabelFor(model => model.UserTitle, new { @class = "control-label" })

                <div class="controls">
                    @Html.DropDownListFor(model => model.UserTitle, Model.UserTitles,GlobalResources.GlobalStrings.PleaseSelectItemsRESX)
                    @Html.ValidationMessageFor(model => model.UserTitle)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(model => model.UserName, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.UserName)
                    @Html.ValidationMessageFor(model => model.UserName)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(model => model.Firstname, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.Firstname)
                    @Html.ValidationMessageFor(model => model.Firstname)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(model => model.Lastname, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.Lastname)
                    @Html.ValidationMessageFor(model => model.Lastname)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(model => model.Password, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.Password)
                    @Html.ValidationMessageFor(model => model.Password)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(model => model.ConfirmPassword, new { @class = "control-label" })

                <div class="controls">
                    @Html.EditorFor(model => model.ConfirmPassword)
                    @Html.ValidationMessageFor(model => model.ConfirmPassword)
                </div>
            </div>
            <div class="control-group">
                <div class="controls">
                    @ReCaptcha.GetHtml()
                </div>
            </div>

            <div class="form-actions">
                <input class="btn btn-primary" type="submit" value="@GlobalResources.Navigation.RegisterButtonRESX" />
            </div>
        </fieldset>
    }
</div>

<div class="span12">
    <div class="well">
        @Html.ActionLink(GlobalResources.Navigation.BackToLoginRESX, EActionAccount.Login.ToString(), EControllers.Account.ToString(), null, new { @class = "btn btn-small", data_icon = "icon-arrow-left" })
    </div>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
